
<div id="main-content"> <!-- Main Content Section with everything -->			
	<!-- Page Head -->	
	<?php if($this->session->userdata['id']==1):?>
	<ul class="shortcut-buttons-set">				
		<li><a class="shortcut-button" href="<?php echo base_url();?>users/new_user"><span>
			<img src="<?php echo base_url();?>images/icons/image_add_48.png" alt="icon" /><br />
			New
		</span></a></li>
		
	</ul><!-- End .shortcut-buttons-set -->	
	<?php endif;?>
	<div class="clear"></div> <!-- End .clear -->
	
	<div class="content-box"><!-- Start Content Box -->
		
		<div class="content-box-header">
			
			<h3>管理员</h3>					
			<div class="clear"></div>
			
		</div> <!-- End .content-box-header -->
		
		<div class="content-box-content">
			
			<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->						
				<table>
					
					<thead>
						<tr>								   
						   <th>No.</th>
						   <th>管理员名称</th>
						   <th>Operation</th>
						</tr>
						
					</thead>
				 
					<tfoot>
						<tr>
							<td colspan="3">										
							</td>
						</tr>
					</tfoot>
				 
					<tbody>
					<?php $i=0; foreach($query as $row):?>
						<tr>									
							<td><?php $i++;echo $i;?></td>
							<td><?php echo $row['name'];?></td>							
							<td>
							<?php if($this->session->userdata['id']=='1'):?>
								<?php if($row['id'] != '1'):?>
									<!-- Icons -->
									 <a href="<?php echo base_url()?>users/modify_user/<?php echo $row['id'];?>" title="Edit"><img src="<?php echo base_url()?>images/icons/pencil.png" alt="Edit" /></a>
									 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									 <a href="<?php echo base_url()?>users/del_user/<?php echo $row['id'];?>" title="Delete" onclick='return del()'><img src="<?php echo base_url()?>images/icons/cross.png" alt="Delete" /></a> 
								<?php endif;?>
							<?php else:?>
								<?php if($row['id'] == $this->session->userdata['id']):?>
									<!-- Icons -->
									 <a href="<?php echo base_url()?>users/modify_user/<?php echo $row['id'];?>" title="Edit"><img src="<?php echo base_url()?>images/icons/pencil.png" alt="Edit" /></a>
									 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									 <a href="<?php echo base_url()?>users/del_user/<?php echo $row['id'];?>" title="Delete" onclick='return del()'><img src="<?php echo base_url()?>images/icons/cross.png" alt="Delete" /></a> 
								<?php endif;?>
							<?php endif;?>
							</td>						
						</tr>
					<?php endforeach;?>	
					</tbody>
					
				</table>
				
			</div> <!-- End #tab1 -->
			

			
		</div> <!-- End .content-box-content -->
		
	</div> <!-- End .content-box -->
	<div class="clear"></div>			
</div> <!-- End #main-content -->	
